import request from '@/utils/request'

export function addBorrow(data) {
  return request({
    'url': '/golden/advance',
    'method': 'post',
    'data': data
  })
}
//借支详情 
export function borrowDetail(id){
	return request({
		'url':`/golden/advance/${id}`,
		'method':'get'
	})
}
//可借支项目
export function borrowProject(data){
	return request({
		'url':`/golden/advance/projectlist`,
		'method':'get',
		'data':data
	})
}
//借支列表-工人
export function borrowList(data){
	return request({
		'url':`/golden/advance/list`,
		'method':'get',
		'data':data
	})
}
//借支列表-班组长和管理员
export function borrowLeaderList(data){
	return request({
		'url':`/golden/advance/leaderList`,
		'method':'get',
		'data':data
	})
}
//管理员审批
export function borrowManagerAudit(data){
	return request({
		'url':`/golden/advance/managerAudit`,
		'method':'put',
		'data':data
	})
}
//班组长审批
export function borrowLeaderAudit(data){
	return request({
		'url':`/golden/advance/leaderAudit`,
		'method':'put',
		'data':data
	})
}



//查询员工工资申领列表
export function salaryList(data){
	return request({
		'url':`/golden/salary/apply/list`,
		'method':'get',
		'data':data
	})
}

//获取员工待申领工资详细
export function salaryToApply(data){
	return request({
		'url':`/golden/salary/apply/toApply`,
		'method':'get',
		'data':data
	})
}

//获取员工工资申领详细信息
export function salaryDetail(id){
	return request({
		'url':`/golden/salary/apply/${id}`,
		'method':'get',
	})
}
//新增员工工资申领
export function salaryApply(data){
	return request({
		'url':`/golden/salary/apply`,
		'method':'post',
		'data':data
	})
}


//查询借支代发任务单列表
export function tobeSend(data){
	return request({
		'url':`/golden/advance/tobeSend`,
		'method':'get',
		'data':data
	})
}

//查询借支代发任务总额
export function tobeSendTotal(data){
	return request({
		'url':`/golden/advance/tobeSendTotal`,
		'method':'get',
		'data':data
	})
}

//查询借支已发任务单列表
export function alreadyToSend(data){
	return request({
		'url':`/golden/advance/alreadySend`,
		'method':'get',
		'data':data
	})
}

//查询借支已发任务总额
export function alreadyToSendTotal(data){
	return request({
		'url':`/golden/advance/alreadySendTotal`,
		'method':'get',
		'data':data
	})
}

//立即发放/app/golden/advance/immediately-send
export function immediatelySend(data){
	return request({
		'url':`/golden/advance/immediately-send`,
		'method':'post',
		'data':data
	})
}

//审核员工申领工资-项目管理员
export function salaryManagerAudit(data){
	return request({
		'url':`/golden/salary/apply/managerAudit`,
		'method':'put',
		'data':data
	})
}

//审核员工申领工资-班组长
export function salaryLeaderAudit(data){
	return request({
		'url':`/golden/salary/apply/leaderAudit`,
		'method':'put',
		'data':data
	})
}